//package com.nuoyan.web.config;
//
//
//import com.nuoyan.core.interceptor.JwtTokenAdminInterceptor;
//import com.nuoyan.core.interceptor.JwtTokenUserAppInterceptor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
//
//import javax.annotation.Resource;
//
///**
// * 配置类，注册web层相关组件
// */
//@Configuration
//@Slf4j
//public class WebMvcConfiguration extends WebMvcConfigurationSupport {
//
//    @Resource
//    private JwtTokenAdminInterceptor jwtTokenAdminInterceptor;
//    @Resource
//    private JwtTokenUserAppInterceptor jwtTokenUserAppInterceptor;
//
//    /**
//     * 注册自定义拦截器
//     *
//     * @param registry
//     */
//    protected void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(jwtTokenAdminInterceptor)
//                .addPathPatterns("/api-admin/**")
//                .excludePathPatterns("/api-admin/user/doLogin");
//
//        registry.addInterceptor(jwtTokenUserAppInterceptor)
//                .addPathPatterns("/api-app/**")
//                .excludePathPatterns("/api-app/user/doLogin");
//    }
//
//}
